import 'package:car_web/model/car_entity.dart';

carEntityFromJson(CarEntity data, Map<String, dynamic> json) {
	if (json['carImg'] != null) {
		data.carImg = json['carImg'].toString();
	}
	if (json['carType'] != null) {
		data.carType = json['carType'].toString();
	}
	if (json['carScore'] != null) {
		data.carScore = json['carScore'].toString();
	}
	if (json['quotedPrice'] != null) {
		data.quotedPrice = json['quotedPrice'].toString();
	}
	if (json['guidePrice'] != null) {
		data.guidePrice = json['guidePrice'].toString();
	}
	if (json['carAttributes'] != null) {
		data.carAttributes = json['carAttributes'].toString();
	}
	return data;
}

Map<String, dynamic> carEntityToJson(CarEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['carImg'] = entity.carImg;
	data['carType'] = entity.carType;
	data['carScore'] = entity.carScore;
	data['quotedPrice'] = entity.quotedPrice;
	data['guidePrice'] = entity.guidePrice;
	data['carAttributes'] = entity.carAttributes;
	return data;
}